package nomads;

import java.util.*;

public class GameMap 
{
	private HashMap<Position,Double> delayMap=new HashMap<Position,Double>();
	private HashMap<Position,String> resourceMap=new HashMap<Position,String>();
	private HashMap<Position,String> botMap=new HashMap<Position,String>();
	private IMapView mapView;

	public class Position
	{
		private int x,y;
		
		public Position(){
		}
		public Position(int x, int y) 
		{
			this.x=x;
			this.y=y;
		}
		public boolean equals(Object o)
		{
			if(o instanceof Position)
				return ((x==((Position)o).x)&&(y==((Position)o).y));
			else
				return false;
		}
	}
	public GameMap(int height, int width, IMapView mapView)
	{
		this.mapView=mapView;
		//initialize maps
	}
	//delay stuff
	public synchronized double getDelay(Position p)
	{
		return 0;
	}
	//resource stuff
	public synchronized int getResourceCount(Position p, String resource)
	{
		return 0;
	}
	public synchronized int takeResource(Position p, String resource)
	{
		return 0;
	}
	public synchronized boolean putResource(Position p, String resource, int count)
	{
		return true;
	}
	public synchronized ArrayList<Position> getResourcePositions(String resource)
	{
		return new ArrayList<Position>();
	}
	//player stuff
	public synchronized ArrayList<String> getPlayers()
	{
		return new ArrayList<String>();
	}
	public synchronized Position getPlayerPosition(String player)
	{
		return new Position();
	}
	public synchronized void move(String player, Position p)
	{
	}
}
